{% extends 'base.html' %}
{% load static %}
{% block title %}订单页面{% endblock %}
{% block header %}
    <link rel="stylesheet" type="text/css" href="{% static '/css/public.css' %}">
    <link rel="stylesheet" type="text/css" href="{% static '/css/proList.css' %}">
    <style>
        /* 移除所有<ul>元素的前置符号（如圆点），并移除边距和填充 */
        ul {
            list-style-type: none; /* 移除列表项前的默认符号 */
            margin: 0; /* 移除外边距 */
            padding: 0; /* 移除内边距 */
        }

        /* 进一步地，你也可以为<li>元素设置样式，以确保它们之间没有默认的边距或填充 */
        li {
            margin: 0; /* 移除外边距（如果需要） */
            padding: 0; /* 移除内边距（如果需要） */
            /* 你可以在这里添加其他样式，比如背景色、边框等 */
        }
    </style>
{% endblock %}




{% block content %}
    <div class="order cart mt">
			<!-----------------site------------------->
			<div class="site">
				<p class="wrapper clearfix">
					<span class="fl">订单确认</span>
				</p>
			</div>
			<!-----------------orderCon------------------->
			<div class="orderCon wrapper clearfix">
				<div class="orderL fl">
					<!--------h3---------------->
					<h3>收件信息</h3>
					<!--------addres---------------->
					<div class="addres clearfix">
						<div class="addre fl on">
							<div class="tit clearfix">
								<p class="fl"><span id="name_address">{{ address.aname }}</span>
									<span class="default">[默认地址]</span>
								</p>
							</div>
							<div class="addCon">
								<p id="address_address">{{ address.addr }}</p>
								<p id="phone_address">{{ address.aphone }}</p>
							</div>
						</div>
					</div>
					<h3>支付方式</h3>
					<!--------way---------------->
					<div class="way clearfix">
                    <p><option>支付宝</option></p>

					</div>

					<!--------dis---------------->

				</div>
				<div class="orderR fr">
					<div class="msg">
						<h3>订单内容</h3>
						<!--------ul---------------->

                        {% for obj in cart_list %}

          <ul class="clearfix">
							<li class="fl">
								<img src="/{{ obj.goods_img }}" width="87px" height="87px">
							</li>
							<li class="fl">
								<p>名称：{{ obj.goods_name }}</p>
								<p>数量：{{ obj.number}}</p>
							</li>
							<li class="fr">单价：￥{{ obj.goods_price }}</li>
          </ul>
          {% endfor %}
                        
                    </div>
					<!--------tips---------------->
					<div class="tips">
{#						<p><span class="fl">商品金额：</span><span class="fr">￥{{ sum }}</span></p>#}
{#						<p><span class="fl">优惠金额：</span><span class="fr">￥0.00</span></p>#}
						<p><span class="fl">总数：</span><span class="fr">{{ num }}</span></p>
					</div>
					<!--------tips count---------------->
					<div class="count tips">
						<p><span class="fl">合计：</span><span class="fr" id="sum" data-value="{{ sum }}">￥{{ sum }}</span></p>
					</div>
					<!--<input type="button" name="" value="去支付"> -->
					<a href="javascript:;" id="pay" class="pay" >去支付</a>
				</div>
			</div>
		</div>
{% endblock %}


{% block footer %}
    <script src="{% static  '/vendor/bootstrap/js/bootstrap.bundle.js' %}"></script>
    <script src="{% static '/js/public.js' %}" type="text/javascript" charset="utf-8"></script>
    <script src="{% static '/js/pro.js'%}" type="text/javascript" charset="utf-8"></script>
    <script src="{% static '/js/user.js' %}" type="text/javascript" charset="utf-8"></script>
<script>
 //支付
  $("#pay").click(function(){
      var sum = $('#sum').data('value');
      $.ajax({
          url:'/order/alipay/',
          type:'GET',
          data:{sum:sum},
          success:function (response){
               window.location.href = response.url;
          }
      })

  })
</script>

{% endblock %}